<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class RegisterConfirmationEmail extends Mailable
{
  use Queueable;
  use SerializesModels;

  public $user;
  public $locale;

  public function __construct(array $user, string $locale)
  {
    $this->user = $user;
    $this->locale = $locale;
  }

  public function build()
  {
    return $this->subject(trans('coreapi.registration_email_subject'))
      ->view('emails.registerConfirmationEmail');
  }
}
